package exception;

import java.io.FileOutputStream;

public class AutoCloseableDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了...");
        try (
                FileOutputStream fos=new FileOutputStream("book111.txt");
                ){
            fos.write(123);
        }catch (Exception e){
            e.printStackTrace();
        }
        System.out.println("程序结束了...");
    }
}
